package com.study.lu.thread.producercustomer;

import com.study.lu.thread.producercustomer.newjdk.FoodFactoryByLock;
import com.study.lu.thread.producercustomer.oldjdk.FoodFactory;

import java.util.ArrayList;
import java.util.List;

/**
 * <b>System：</b>incommonusefactory<br/>
 * <b>Title：</b>TestNewJDK.java<br/>
 * <b>Description：</b> 对功能点的描述<br/>
 * <b>@author： </b>raoluping<br/>
 * <b>@date：</b>2017/12/23 17:05<br/>
 * <b>@version：</b> 1.0.0.0 <br/>
 * <b>Copyright (c) 2017 ASPire Tech.</b>
 */
public class TestNewJDK {
    public static void main(String[] args) {
        List<Food> foods = new ArrayList<>();
        FoodFactoryByLock foodFactory = new FoodFactoryByLock();

        ProducerThread producerThread = new ProducerThread("生产者", foodFactory);

        CustomerThread customerThread = new CustomerThread("消费者", foodFactory);

        /*
         * for(int i = 0;i<10;i++){ new Thread(producerThread).start(); new
         * Thread(customerThread).start(); }
         */

        new Thread(producerThread).start();
        new Thread(customerThread).start();



    }
}
